package com.mz.demo.utils.entity;

import lombok.Data;

@Data
public class GlobalException extends RuntimeException {

    private Integer code;
    private String msg;

    public static GlobalException gen(Integer code, String msg ){
        GlobalException globalException = new GlobalException();
        globalException.code = code;
        globalException.msg = msg;
        return globalException;
    }
}
